<?php
/* $Id: index.php 2183 2010-01-07 16:09:55Z d_pocock $ */
include_once GANGLIA_PATH ."/src/eval_config.php";
# ATD - function.php must be included before get_context.php.  It defines some needed functions.
include_once GANGLIA_PATH ."/src/functions.php";
include_once GANGLIA_PATH ."/src/get_context.php";
include_once GANGLIA_PATH ."/src/ganglia.php";
include_once GANGLIA_PATH ."/src/get_ganglia.php";
include_once GANGLIA_PATH ."/src/class.TemplatePower.inc.php";
# Usefull for addons.
$ganglia_GHOME = ".";

if ($ganglia_context == "meta" or $ganglia_context == "control")
   {
      $title = "$ganglia_self $ganglia_meta_designator Report";
      include_once GANGLIA_PATH ."/src/header.php";
      include_once GANGLIA_PATH ."/src/meta_view.php";
   }
else if ($ganglia_context == "tree")
   {
      $title = "$ganglia_self $ganglia_meta_designator Tree";
      include_once GANGLIA_PATH ."/src/header.php";
      include_once GANGLIA_PATH ."/src/grid_tree.php";
   }
else if ($ganglia_context == "cluster" or $ganglia_context == "cluster-summary")
   {
      $title = "$ganglia_clustername Cluster Report";
      include_once GANGLIA_PATH ."/src/header.php";
      include_once GANGLIA_PATH ."/src/cluster_view.php";
   }
else if ($ganglia_context == "physical")
   {
      $title = "$ganglia_clustername Physical View";
      include_once GANGLIA_PATH ."/src/header.php";
      include_once GANGLIA_PATH ."/src/physical_view.php";
   }
else if ($ganglia_context == "node")
   {
      $title = "$ganglia_hostname Node View";
      include_once GANGLIA_PATH ."/src/header.php";
      include_once GANGLIA_PATH ."/src/show_node.php";
   }
else if ($ganglia_context == "host")
   {
      $title = "$ganglia_hostname Host Report";
      include_once GANGLIA_PATH ."/src/header.php";
      include_once GANGLIA_PATH ."/src/host_view.php";
   }
else
   {
      $title = "Unknown Context";
      print "Unknown Context Error: Have you specified a host but not a cluster?.";
   }
include_once GANGLIA_PATH ."/src/footer.php";


